INfcService

Interface definition for a service that interacts with NFC cards.

Inheritors

Types

Link copied to clipboard
open class Default : INfcService
Default implementation for INfcService.
Link copied to clipboard
abstract class Stub : Binder, INfcService
Local-side IPC implementation stub class.

Functions

Link copied to clipboard
abstract fun asBinder(): IBinder
Link copied to clipboard
abstract fun closeReader()
Closes the reader.
Link copied to clipboard
abstract fun openCardReader(timeout: Long): CardOpenResult
This method will block until a card is inserted into the default card reader.
Link copied to clipboard
Reads Mifare sectors from the NFC card.
Link copied to clipboard
abstract fun readNfcData(auth: String): CardReadResult
Reads data from the NFC card.
Link copied to clipboard
abstract fun readNfcUID(): CardReadResult
Opens NFC &FeliCa readers &reads the UID (Unique Identifier) of the card.
Link copied to clipboard
abstract fun sendAPDU(apdu: Array<Byte>, bufferSize: Int, closeAfterResponse: Boolean): NfcCommandResponse
Sends an APDU command to the card and returns the response.
Link copied to clipboard
abstract fun sendFelicaCommand(command: Array<Byte>, bufferSize: Int, closeAfterResponse: Boolean, timeout: Long): NfcCommandResponse
Sends a FeliCa command to the card.
Link copied to clipboard
abstract fun writeMifareSectors(writeSectorRequest: MifareSectorRequest): CardReadResult
Writes Mifare sectors to the NFC card.
Link copied to clipboard
abstract fun writeNfcData(auth: String, data: String): CardReadResult
Writes data to the NFC card.